// import configs from './../../configs';

export default {
  // 获取指定数据
  partData(basicData, fields) {
    var returnData = {}
    if (typeof fields == 'object') {
      fields.map(item => {
        if (basicData[item] == null) {
          basicData[item] = ''
        }
        returnData[item] = basicData[item]
      })
    }
    return returnData

  },
  extendDeep(parent, child) {
    var i, proxy
    // proxy = JSON.stringify(parent) //把parent对象转换成字符串
    // proxy = JSON.parse(proxy) //把字符串转换成对象，这是parent的一个副本
    child = child || {}
    for (i in proxy) {
      if (proxy.hasOwnProperty(i)) {
        child[i] = proxy[i]
      }
    }
    proxy = null // 因为proxy是中间对象，可以将它回收掉
    return child
  }
}
